using BasicScript;
using UnityEngine;

namespace Game.Component
{
	public class UIDepth : MonoBehaviour
	{
		public int order;

		private void Start()
		{
			Renderer[] componentsInChildren = GetComponentsInChildren<Renderer>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				componentsInChildren[i].sortingOrder = order;
			}
			if (ClientConfig.PLATFORM != 0)
			{
				Object.Destroy(this);
			}
		}
	}
}
